﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Budget.Buttons
{
    class MyCustomButton : System.Windows.Forms.Button
    {
        public delegate void OnCustomClickEventHandler(object sender, CustomEventArgs eventArgs);
        public event OnCustomClickEventHandler OnCustomClickEvent;
        public class CustomEventArgs : EventArgs
        {
            public string CustomeProperty1;
            public string CustomeProperty2;
        }

        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);
            if (OnCustomClickEvent != null)
            {
                OnCustomClickEvent(this, new CustomEventArgs());
            }
        }
    }
}
